<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page language="java" import="java.util.*" %>
<%@  page import   =   "java.text.*"   %>
<%@  page import   =   "java.sql.*"   %>
<% String context = request.getContextPath();%>
<html>
<head>
<title>上传文件</title>
<link href="<%= request.getContextPath()%>/css/montview.css" rel="stylesheet" type="text/css"/>
<LINK href="<%=request.getContextPath()%>/css/oa.css" rel=stylesheet />
<LINK href="<%=request.getContextPath()%>/css/common.css" rel=stylesheet />
<link href="<%= request.getContextPath()%>/css/calender.css" rel="stylesheet" type="text/css">
<script src="<%=request.getContextPath()%>/js/calendar.js" language="javascript"></script>
<script src="<%=request.getContextPath()%>/js/check_char.js" language="javascript"></script>
<script language="javascript" src="<%= request.getContextPath()%>/js/calender.js" type=""></script>
<Style>
.win {background-color: #C0D0E8;width:260px;font-family: verdana;font-size: 9pt;}
.Calendar {font-family: verdana;text-decoration: none;font-size: 9pt;border:0px dotted #1C6FA5 center;empty-cells:show;}
.CalendarTD {font-family: verdana;font-size: 8pt;color: #000000;background- color:white;height: 20px;text-align: left;empty-cells:show ;}
.CalendarTD1 {font-family: verdana;font-size: 8pt;color: #FF0000;background- color:white;height: 20px;text-align: left;empty-cells:show ;} 
</Style>
<script type="text/javascript" src="<%= request.getContextPath()%>/js/jquery-1.3.2.min.js"></script>

<script type="text/javascript">
function entry_excel(){
    var theFile = document.getElementById("theFile");
    if(theFile.value!=""){
        alert(theFile.value);
        var form=document.forms[0];   
        form.method='post';  
        form.setAttribute('encoding','multipart/form-data');  
        form.action='<%= request.getContextPath()%>/action1.do?action=getfile';  
        form.submit();
        }
     else {
         alert("请导入文件！");  
         return false; 
     }
}
</script>
</head>

<body>
<br><br><br>
<form  action="<%= request.getContextPath()%>/action2.do?action=getfile" method="POST" enctype="multipart/form-data">
<table width="90%" border="0" cellspacing="0" cellpadding="0" id=label>
  <tr>
    <td width="10"><img src="<%= request.getContextPath()%>/images/label_left.gif"></td>
    <th width="90" nowrap background="<%= request.getContextPath()%>/images/label_bg.gif" >上传文件</th>
    <td><img src="<%= request.getContextPath()%>/images/label_right.gif"></td>
  </tr>
</table>
<input type="hidden" name="path" id="path"/>
<div align="center">
<div id=formTable>
<table>

<tr>
<th height="24" class="yd_ltd" ><div align="right">上传文件：</div></th>
<td class="yd_ltd" >
           <input type="file" id="theFile" name="theFile" size=100 onchange="document.getElementById('path').value=encodeURI(this.value)">
           <input type="submit" name="submit"  value="上传">
           <input type="hidden" id="path" name="path"/>
</td>
</tr>
<tr>
</table>
</div>
</div>

</form>
</body>

</html>